﻿using System;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;

namespace YJKRevitDimension.PlaneSlopeDimension
{
	[Transaction(TransactionMode.Manual)]
	internal class CMD : IExternalCommand
	{
		public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			Result result;
			try
			{
				new LeaderDimJig(commandData.Application.ActiveUIDocument).StartPoint = new XYZ(0.0, 0.0, 0.0);
				commandData.Application.ActiveUIDocument.Selection.PickPoint("请选择标注位置：");
				result = Autodesk.Revit.UI.Result.Succeeded;
			}
			catch (Exception)
			{
				result = Autodesk.Revit.UI.Result.Failed;
			}
			return result;
		}
	}
}
